package com.xiang.sql.mapper;

import com.xiang.sql.entity.Group;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * 用户分组 Mapper 接口
 * 
 * @author mac-xiang
 */
public interface GroupMapper extends BaseMapper<Group> {
  @Select({
      "UPDATE `group` SET `pid` = '' WHERE id='${id}'"
  })
  String clearCreateById(@Param("id") String id);

  @Select({
      "Select `pid` FROM `group` WHERE id='${id}'"
  })
  String getPidById(@Param("id") String id);

}